package com.dongdongshop.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

@Configuration
public class MyFreemarkerConfig {

    @Bean
    public FreeMarkerConfigurer freeMarkerConfigurer(){
        FreeMarkerConfigurer config = new FreeMarkerConfigurer();
//        模板页面路径
        config.setTemplateLoaderPath("classpath:freemarker");
//        编码
        config.setDefaultEncoding("utf-8");
        return config;
    }
}
